Imports Microsoft.VisualBasic
Imports System.Configuration
Module MessageCTL

    Public Function infoMessage(ByVal img As PictureBox, ByVal code As String, ByVal strMsg As String) As String
        Try

            ' Dim Img As Image = page.FindControl("ImgShowError")
            Dim SubCode As String = code.Substring(0, 1)
            If SubCode = "I" Then
                img.Image = My.Resources.Error01
            ElseIf SubCode = "W" Then
                img.Image = My.Resources.Error02
            ElseIf SubCode = "E" Then
                img.Image = My.Resources.Error03
            End If
        Catch ex As Exception

        End Try


        'Dim rs As String = ""
        'rs = ConfigurationSettings.AppSettings(code)
        ' infoMessage = String.Format(rs, strMsg)
        infoMessage = strMsg
        Return infoMessage
    End Function
    Public Function infoMessage(ByVal img As PictureBox, ByVal code As String) As String
        Try
            ' Dim Img As Image = Page.FindControl("ImgShowError")
            Dim SubCode As String = code.Substring(0, 1)
            If SubCode = "I" Then
                img.Image = My.Resources.Error01
            ElseIf SubCode = "W" Then
                img.Image = My.Resources.Error02
            ElseIf SubCode = "E" Then
                img.Image = My.Resources.Error03
            End If
        Catch ex As Exception

        End Try

        Dim rs As String = ""
        rs = ConfigurationSettings.AppSettings(code)
        Return rs
    End Function

End Module